package com.exception;

import java.io.FileOutputStream;
import java.io.IOException;

/*
异常处理机制在IO操作中的运用
 */
public class FinallyDemo2 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream("./a.b/c.dat");

        }catch (Exception e ){
            System.out.println("io异常");
        }finally {
            try {
                fos.close();
            }catch (Exception e ){
                System.out.println("io异常");
            }
        }


    }
}
